package com.example.coolweather.util;

import okhttp3.OkHttpClient;
import okhttp3.Request;

/**
 * address 请求的url
 * callback 回调
 */

public class HttpUtil {
    public static void sendOkHttpRequest(String address,okhttp3.Callback callback){
        // OkHttpClient 客户端
        OkHttpClient client = new OkHttpClient();
        // 请求地址
        Request request = new Request.Builder().url(address).build();
        // 请求
        client.newCall(request).enqueue(callback);
    }
}
